<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>添加权限</title>
		<link rel="stylesheet" href="__PUBLIC__/frame/layui/css/layui.css">
			<!--<link rel="stylesheet" href="http://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css">-->
		<link rel="stylesheet" href="__PUBLIC__/frame/static/css/style.css">
	</head>
	<body>
		<a href="<?php echo U('lst')?>" class="layui-btn" style="margin-top: 10px; "><i class="layui-icon">&#xe603;</i>权限列表</a>
		<a class="layui-btn btn-add btn-default" id="btn-refresh" style="margin-top: 10px;"><i class="layui-icon">&#x1002;</i></a>
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
          <legend style="font-size: 14px;">添加权限</legend>
        </fieldset>
	<form class="layui-form layui-form-pane" action="__SELF__" method="post">	
		<div class="layui-form-item">
	    <label class="layui-form-label" title="请选择上级权限">请选择上级权限</label>
	    <div class="layui-input-inline">
	      <select name="parent_id">
	      	<option value="0">顶级权限</option>
	      	<?php foreach ($parentData as $k => $v): ?>
	      		<option value="<?php echo $v['id']; ?>"><?php echo str_repeat('-', 8*$v['level']).$v['pri_name']; ?></option>
	      	<?php endforeach; ?>
	      </select>
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">权限名称</label>
	    <div class="layui-input-inline">
	      <input type="text" name="pri_name" lay-verify="required" placeholder="请输入权限名称" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">模型名称</label>
	    <div class="layui-input-inline">
	      <input type="text" name="module_name" lay-verify="required" placeholder="请输入模型名称" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">控制器名称</label>
	    <div class="layui-input-inline">
	      <input type="text" name="controller_name" lay-verify="required" placeholder="请输入控制器名称" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">方法名称</label>
	    <div class="layui-input-inline">
	      <input type="text" name="action_name" lay-verify="required" placeholder="请输入方法名称" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
			    <div class="layui-input-block">
			      <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
			      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
			    </div>
			</div>
	</form>
		
	</body>
	<script type="text/javascript" src="__PUBLIC__/frame/layui/layui.js"></script>
	<script>
	layui.use(['form', 'jquery','layer','layedit', 'laydate'], function(){
	  var form = layui.form
	  ,    $ = layui.jquery
	  ,layer = layui.layer
	  ,layedit = layui.layedit
	  ,laydate = layui.laydate;
	$('#btn-refresh').on('click', function () {
        location.reload();
    });	
		
	});
	
	
	
	
</script>
</html>
